package com.hhq.service.Impl;

import com.hhq.entity.Dept;
import com.hhq.mapper.DeptMapper;
import com.hhq.service.Deptservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptserviceImpl implements Deptservice {
    @Autowired
    DeptMapper deptMapper;
    public List<Dept> getAllDept() {
        return deptMapper.getAllDept();
    }

    @Override
    public List<Dept> findDeptByName(String name) {
        return deptMapper.findDeptByName(name);
    }

    @Override
    public int addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }

    @Override
    public void deleteDept(String name) {
        deptMapper.deleteDept(name);
    }
}
